

#include <stdint.h>




/*
 *  incr = 0, get curr postion.
 *  incr > 0, alloc.
 *  ince < 0, free.
 */
extern char __BSS_END__[];
void * _sbrk( intptr_t incr )
{
	static intptr_t  heapos = (intptr_t)__BSS_END__;
	void * prepos = (void *)heapos;
	
	if ( incr > 0 )  {
		/* judge range, err for return (void *)(-1).. */
		heapos += incr;
	} else {
		heapos += incr;
	}
	
	/**/
	return prepos;
}

